package org.stvd.service.oauth;

import org.springframework.security.oauth2.common.exceptions.InvalidScopeException;
import org.springframework.security.oauth2.provider.AuthorizationRequest;
import org.springframework.security.oauth2.provider.ClientDetails;
import org.springframework.security.oauth2.provider.TokenRequest;
import org.springframework.security.oauth2.provider.request.DefaultOAuth2RequestValidator;

/*
 * 验证/oauth/authorize中的客户端信息是否正确，如scope
 */
public class CustomOAuth2RequestValidator extends DefaultOAuth2RequestValidator {

    @Override
    public void validateScope(AuthorizationRequest authorizationRequest, ClientDetails client)
            throws InvalidScopeException {
        super.validateScope(authorizationRequest, client);
    }

    @Override
    public void validateScope(TokenRequest tokenRequest, ClientDetails client) throws InvalidScopeException {
        super.validateScope(tokenRequest, client);
    }


}
